﻿Public Partial Class MasterPage
    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Page.User.Identity.IsAuthenticated Then
            Login1.Visible = False
            Hello.Visible = True
            HyperLink7.Visible = True
        Else
            Login1.Visible = True
            Hello.Visible = False
            HyperLink7.Visible = False
            HyperLink5.Visible = False
        End If
    End Sub

    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click

        Session("Search") = TBsearch.Text
        Response.Redirect("SearchResults.aspx")
    End Sub
End Class